package test;

import test.factory.*;
import test.impl.RealBuyer;

public class ComputeMain {
    public static void main(String[] args) {
        //上机1
//        Compute dao= ComputeFactory.getCompute("/");
//        int compute = dao.compute(2, 2);
//        System.out.println(compute);

        //上机2
//        Compute dao=new MultiplyFactory().computee();
//        int compute = dao.compute(5, 9);
//        System.out.println(compute);

        //上机三01
//        Buyer buyer= IntermediaryJdkFactory.create(new RealBuyer());
//        String result=buyer.havealook();
//        System.out.println(result);

        //上机三02
        RealBuyer buyer=IntermediaryCglibProxyFactory.create(RealBuyer.class);
        String result=buyer.havealook();
        System.out.println(result);

    }
}
